<script language="javascript">

function checkYearMonth(yearMonth){
	  var re=/^[1-2][0-9]{3}(0[1-9]|1[0-2])$/g;
	  return re.test(yearMonth);
}
function getNextYearMonth(yearMonth){
	  
	  //alert(yearMonth);
	  var year=yearMonth.substring(0,4);
	  var month=yearMonth.substring(4,6);
	  var nextYearMonth='';
	  if(month==12){
	    month=1;
	    year++;
	  }
	  else{
	     month++;
	  }
	  if(month<=9){
	    nextYearMonth=year+'0'+month;
	  }
	  else{
	    nextYearMonth=year+''+month;
	  }
	  return nextYearMonth;
	}

	function getLastYearMonth(yearMonth){
	 
	  var year=yearMonth.substring(0,4);
	  var month=yearMonth.substring(4,6);
	  var lastYearMonth='';
	  if(month==1){
	    month=12;
	    year--;
	  }
	  else{
	     month--;
	  }
	  if(month<=9){
	    lastYearMonth=year+'0'+month;
	  }
	  else{
	    lastYearMonth=year+''+month;
	  }
	  return lastYearMonth;
	}
	
	function getCurrentYearMonth(){
		  var currentDate=new Date();
		  var year=currentDate.getYear();
		  var month=currentDate.getMonth()+1;
		  var yearMonth='';
		  if(month<=9){
		   yearMonth=year+'0'+month;
		  }
		  else{
		    yearMonth=year+''+month;
		  }
		  return yearMonth;
	}
	
	function getDefaultStartYearMonth(){
		  var currentDate=new Date();
		  var year=currentDate.getYear();
		  return year+'0'+1;
	}
	
	function getDefaultEndYearMonth(){
		  var currentDate=new Date();
		  var year=currentDate.getYear();
		  return year+''+12;
	}
</script>